#Fig_4

fig4_data<- read.csv("Fig4_data.csv")

fig4_data %>%
  ggplot(aes(x=seq, y=prop, color=
               factor(time_period, levels = c("1946_to_1989", "1990_to_2021"), 
                      labels = c("1946-1989", "1990-2021")))) +
  geom_step() +
  labs(color = "Time Period", x="Number of Unique Countries", y="Percentage of Recurrences")+
  theme_bw()

ggsave("Fig4.png", path=imdir, width=6, height = 4, units="in")
